﻿@model ASP.NET_MVC5_Bootstrap3_3_1_LESS.Models.MeaModel
@{
    ViewBag.Title = "Home Page";

    if (string.IsNullOrEmpty(Model.loc))
    {
        foreach (string str in Model.locations.Keys)
        {
            Model.loc = str;
            break;
        }
    }
}

<h4>Most Effective Antibiotics</h4>
<ul class="nav nav-tabs">
    @foreach (string str in Model.locations.Keys)
    {
        string wActive = "";
        if (str == Model.loc)
        {
            wActive = "active";
        }
        <li role="presentation" class="@wActive"><a href="~/MEA/Index?loc=@str&organism=@Model.organism">@Model.locations[str]</a></li>
    }    
</ul>
@using (Html.BeginForm("Index", "MEA", FormMethod.Post, new { id = "MEAForm" }))
{ 
<div>
    <br />
    Organism:<br />
    @Html.HiddenFor(m => m.loc)
    @Html.DropDownListFor(m => m.organism, Model.organismListItems, new { @onchange = "document.getElementById('MEAForm').submit();" })
    <br />
    <br />
    <p>@Model.display</p>
</div>
}

<script>

</script>